<?php include "../../layout/header.php"; ?>
<?php include "../../layout/navleft.php"; ?>
<?php include "../../db/dbconnect.php"; ?>
<link rel="stylesheet" href="<?php echo($siteroot);?>css/community.css" type="text/css" />

<div id="content_medium_left">
	<div class="container_brown">
		<div class="container_brown_title">News and Events</div>
		<div class="community_div">
			<br>
			<table class="community_table" border=1 cellspacing=1 cellpadding=8>
                <tr>
                    <th width="20%">Date</th>
                    <th width="20%">Title</th>
                    <th width="60%">Content</th>
                </tr>
                <?php
                    $query = "SELECT * FROM news ORDER BY date DESC";
                    $result = mysql_query($query) or die(mysql_error());
                     while($row = mysql_fetch_array( $result )) {
                         echo "<tr>";
                         echo "<td>".$row['date']."</td>";
                         echo "<td>".$row['title']."</td>";
                         echo "<td>".$row['content']."</td>";
                         echo "</tr>";
                     }
                ?>
            </table>
		</div>
	</div>
</div>

<?php include "../../layout/footer.php"; ?>